//
// Created by Zhang on 2021/3/31.
//

#include "q20.h"
# include "stdio.h"

void bigger_and_less_bigger(int *a, int *b, int *c, int **d, int **e) {
    int *temp, *a1 = a, *b2 = b, *c3 = c;
    for (int i = 0; i < 3; i++) {
        if (*a1 > *b2 & *a1 > *c3) {
            *d = a1;
            if (*b2 > *c3) {
                *e = b2;
            } else {
                *e = c3;
            }
            break;
        }
        temp = c3;
        c3 = b2;
        b2 = a1;
        a1 = temp;
    }
    printf("%d,%d\n", **d, **e);
}


int unit_test_20(int a, int b, int c) {
    int *biggest = NULL, *bigger = NULL;
    bigger_and_less_bigger(&a, &b, &c, &biggest, &bigger);
    printf("%d,%d\n", *biggest, *bigger);
    return 1;
}